package com.tyhy.program.cbc.mobileapi.enums;

/**
 * 跨界营销用户类型
 */
public enum BusinessTypeEnum {
    /**
     * 好客e站id
     */
    HK_USERID("HK_USERID","好客e站id"),
    /**
     * 统建openId
     */
    HK_OPENID("HK_OPENID","统建openId"),
    /**
     * 官方微信
     */
    GW_OPENID("SGW_OPENID","官方微信");

    private String code;
    private String name;
    BusinessTypeEnum(String code, String name){
        this.code = code;
        this.name = name;
    }

    public static String getName(String code){
        for (BusinessTypeEnum obj : BusinessTypeEnum.values()) {
            if(obj.getCode().equals(code)){
                return obj.getName();
            }
        }
        return "";
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }
}
